<template>
  <div class="page-header flex_aic_jcsb mb12">
    <div class="page-header-left flex_aic">
      <span class="fs-14">{{ title }}</span>
      <SvgIcon
        v-if="showTipsIcon"
        name="iconziyuan18"
        class="ml8 cursor-pointer"
        color="rgb(255, 152, 100)"
        width="16px"
        @click="handleTipsIconClick"
      />
    </div>
    <div class="page-header-right">
      <slot name="right"></slot>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  title: {
    type: String,
    default: "",
  },
  showTipsIcon: {
    type: Boolean,
    default: false,
  },
});

const emit = defineEmits(["tipsIconClick"]);
const handleTipsIconClick = () => {
  emit("tipsIconClick");
};
</script>

<style lang="scss">
.page-header {
  .page-header-left {
    &::before {
      content: "";
      display: inline-block;
      width: 4px;
      height: 16px;
      margin-right: 8px;
      background-color: #1890ff;
    }
    span {
      color: #101010;
      font-size: 14px;
      font-weight: 700;
    }
  }
}
</style>
